Retransmission system and method for a transport offload engine

ABSTRACT

A system and method are provided for performing the retransmission of data in a network. Included is an offload engine in communication with system memory and a network. The offload engine serves for managing the retransmission of data transmitted in the network.

FIELD OF THE INVENTION

The present invention relates to transport offload engines, and more particularly to handling retransmission requests utilizing transport offload engines.

BACKGROUND OF THE INVENTION

Transport offload engines (TOE) include technology that is gaining popularity in high-speed systems for the purpose of optimizing throughput, and lowering processor utilization. TOE components are often incorporated into one of various printed circuit boards, such as a network interface card (NIC), a host bus adapter (HBA), a motherboard; or in any other desired offloading context.

In recent years, the communication speed in systems has increased faster than processor speed. This has produced an input/output (I/O) bottleneck. The processor, which is designed primarily for computing and not for I/O, cannot typically keep up with the data flowing through the network. As a result, the data flow is processed at a rate slower than the speed of the network. TOE technology solves this problem by removing the burden (i.e. offloading) from the processor and/or I/O subsystem.

Exemplary operation 100 of a TOE is set forth in prior art FIG. 1. As shown in the prior art diagram of FIG. 1, a local processor (of any sort) first sends to a TOE a command to transmit data, in order to transmit data corresponding to a transmission control protocol (TCP) connection from the processor having the attached TOE to a remote processor over a network. See operation 102.

Next, in operation 104, the TOE acquires the data, divides it into segments, and adds Ethernet, TCP, and Internet Protocol (IP) headers to each data segment to create a TCP/IP packet corresponding to each segment. Thereafter, the TOE transmits the resulting packets onto the network, as indicated in operation 106.

After the remote processor has received and validated the packets, the remote processor sends acknowledgements (ACKs) back to the local processor indicating how much of the data has been successfully received. Upon receiving an ACK for all the transmitted data (see decision 108), the TOE sends a command complete to the local processor indicating that the transmit command has been completed by the transport function of the TOE. See operation 110. Additional data may then be transmitted, as indicated in operation 112.

For the case in which an ACK is not received by the TOE within a predetermined time after the corresponding packets were sent, indicating an error condition, the TCP data is re-fetched from the TOE's memory. Note operation 114. In operation 116, the TOE can then retransmit some or all of the unacknowledged packets.

Thus, when transmitting data across a packet-switched network, data may be lost and such data must be retransmitted. For this reason, the TOE stores all unacknowledged data. However, with a 10 Gbps link and a possible 200 ms round-trip delay on a wide area network, this could mean that up to 10 Gbps*200 ms, or 2 gigabits, of information must be stored. Unfortunately, this is too much data to be stored in a cost effective manner on an integrated TOE, since integrating on-board memory on the TOE can be costly.

There is thus a need for a cost effective technique for performing network retransmission.

SUMMARY OF THE INVENTION

A system and method are provided for performing the retransmission of data in a network. Included is an offload engine in communication with system memory and a network. The offload engine serves for managing the retransmission of data transmitted in the network.

To accomplish this, the offload engine identifies the data to be retransmitted, retrieves the data to be retransmitted that is stored in the system memory, and retransmits the retrieved data. By utilizing the system memory in such a manner, a cost effective technique for performing network retransmission is provided.

In one embodiment, the offload engine may transmit a status message to a processor to initiate the retrieval of the data to be retransmitted. Optionally, such status message may be transmitted based on the receipt of at least one acknowledgement or lack thereof, based on a timeout, etc. Moreover, the status message may include a handle for a control block for a socket, a sequence number, and/or a retransmit data size associated with the retransmit request.

Moreover, the processor may transmit a retransmit instruction message to the offload engine, in response to the status message. Such retransmit instruction message may include a sequence number, a pointer to a host buffer, etc. It should be noted that the pointer may be maintained by the offload engine and/or the processor.

Optionally, the retransmit instruction message may also include an offset for use with the pointer to identify the data to be retransmitted. Such offset may optionally be included if the data buffer to be retransmitted is only partially acknowledged. Even still, the retransmit instruction message may include a handle for a control block for a socket.

In use, the offload engine may request a direct memory access (DMA) to retrieve the data to be retransmitted, in response to the retransmit instruction message. In response to receipt of the data to be retransmitted, the offload engine may initiate a comparison involving a sequence number. Thereafter, the offload engine may retransmit the data based on the comparison.

It should be noted that the system memory may be coupled to a processor via a bus and/or reside on the processor. Still yet, the offload engine may include a receiver, a poller, memory, a status message generator, a parser, a transmission requester, a DMA queue, a data packet generator, and/or any other desired components.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a flow chart of a prior art method for transmitting and retransmitting data from a host with an interface device such as an offload engine.

FIG. 2 illustrates a network system, in accordance with one embodiment.

FIG. 3 illustrates an exemplary architecture in which one embodiment may be implemented.

FIG. 4 illustrates an exemplary method for performing the retransmission of data in a network, in accordance with one embodiment.

FIG. 5 illustrates an exemplary method for generating a retransmit instruction message, in accordance with one embodiment.

FIG. 6 illustrates an exemplary design and operation for handling retransmission requests, in accordance with an exemplary embodiment.

FIG. 7 illustrates an exemplary design of an SGL used to track data transmissions, in accordance with one embodiment.

DETAILED DESCRIPTION

FIG. 2 illustrates a network system 200, in accordance with one embodiment. As shown, a network 202 is provided. In the context of the present network system 200, the network 202 may take any form including, but not limited to a local area network (LAN), a wide area network (WAN) such as the Internet, etc.

Coupled to the network 202 are a local host 204 and a remote host 206 which are capable of communicating over the network 202. In the context of the present description, such hosts 204, 206 may include a web server, desktop computer, lap-top computer, hand-held computer, printer or any other type of hardware/software. It should be noted that each of the foregoing components as well as any other unillustrated devices may be interconnected by way of one or more networks.

FIG. 3 illustrates an exemplary architecture 300 in which one embodiment may be implemented. In one embodiment, the architecture 300 may represent one of the hosts 204, 206 of FIG. 2. Of course, however, it should be noted that the architecture 300 may be implemented in any desired context.

For example, the architecture 300 may be implemented in the context of a general computer system, a circuit board system, a game console system dedicated for entertainment purposes, a set-top box, a router, a network system, a storage system, an application-specific system, or any other desired system associated with the network 202.

As shown, the architecture 300 includes a plurality of components coupled via a bus 302. Included is at least one processor 304 for processing data. While the processor 304 may take any form, it may, in one embodiment, take the form of a central processing unit (CPU), a chipset (i.e. a group of integrated circuits designed to work and sold as a unit for performing related functions, etc.), or any other desired processing device(s) capable of processing data.

Further included is processor system memory 306 which resides in communication with the processor 304 for storing the data. Such processor system memory 306 may take the form of on or off-board random access memory (RAM), a hard disk drive, a removable storage drive (i.e., a floppy disk drive, a magnetic tape drive, a compact disk drive, etc.), and/or any other type of desired memory capable of storing the data.

In use, programs, or control logic algorithms, may optionally be stored in the processor system memory 306. Such programs, when executed, enable the architecture 300 to perform various functions. Of course, the architecture 300 may simply be hardwired.

Further shown is an offload engine 312 in communication with the processor 304 and the network (see, for example, network 202 of FIG. 2). In one embodiment, the offload engine 312 may remain in communication with the processor 304 via the bus 302. Of course, however, the offload engine 312 may remain in communication with the processor 304 via any mechanism that provides communication therebetween. The offload engine 312 may include a transport (i.e. TCP/IP) offload engine (TOE), or any integrated circuit(s) that is capable of managing the data transmitted in the network.

During operation, in order to provide a cost effective technique for performing network retransmission, the offload engine 312 works to identify data to be retransmitted, retrieve the data to be retransmitted that is stored in system memory (see, for example, the processor system memory 306), and retransmit the retrieved data. By using the system memory to store such data that is retransmitted, the offload engine 312 is capable of being manufactured with less or no integrated memory, thus providing a more cost effective technique. More information will now be set forth regarding an exemplary method by which the offload engine 312 utilizes the system memory in the foregoing manner.

FIG. 4 illustrates an exemplary method 400 for performing the retransmission of data in a network, in accordance with one embodiment. As an option, the method 400 may be carried out in the context of the exemplary architecture 300 of FIG. 3. Of course, however, it should be noted that the method 400 may be implemented in any desired context. Moreover, while various functions may be attributed to exemplary components (i.e. like those set forth hereinabove), it is important to understand that the various functionality may be carried out by any desired entity.

As shown, in decision 401, it is determined whether criteria have been met to warrant a retransmission of data. Just by way of example, such criteria may be based on at least one acknowledgement (ACK) or lack thereof, a duplicate ACK threshold, a timeout, various timing parameters, and/or any other desired criteria. For instance, in an example where the criteria involve a duplicate ACK threshold, the duplicate ACK threshold may be any predetermined or user-configurable number of ACKs received or any other parameter associated with ACKs. In the context of the present description, ACKs include any signal sent from a receiving host to a transmitting host that indicates that data has been transmitted successfully.

If it is determined that the retransmission criteria has been met, per decision 401, a status message is generated and transmitted to a processor (see, for example, processor 304 of FIG. 3), as indicated in operation 402. In one embodiment, the status message is generated utilizing an offload engine (see, for example, offload engine 312 of FIG. 3). Moreover, the status message may take any form capable of requesting the retransmission of data stored in system memory (see, for example, memory 306 of FIG. 3).

As an option, the status message may include various information to facilitate the request for retransmission of the data. For example, the status message may include a sequence number. In the present context, such sequence number may include a number associated with data that is transmitted, where such number reflects the sequence in which such data was transmitted with respect to other transmitted data.

As a further option, the status message may include a retransmit data size. Typically, the retransmit data size is the largest amount of data, specified in bytes, for example, that a remote host can handle in a single, unfragmented piece. The retransmit data size may also be specified by the remote host in the ACK received by the local host. In this case, multiple TCP packets may be requested for retransmission by the remote host. Still yet, the status message may include a control block (CB) handle for a socket, or any other desired information. It should be noted that the CB may include various information such as information associated with the data that is recently acknowledged.

Table 1 illustrates an exemplary status message format. Such format is set forth for illustrative purposes only, and should not be considered as limiting in any manner. TABLE 1 Ver SB Length SB Code CB Handle [15:0] Sequence Number [31:0] — Retransmit Data Size [15:0]

Next, in response to the status message, a retransmit instruction message is generated by the processor and transmitted to the offload engine. See operation 404. In the context of the present description, the retransmit instruction message includes any information capable of facilitating retrieval of data to be retransmitted, in the manner that will soon be set forth. More information regarding such retransmit instruction message will be set forth in greater detail during reference to FIG. 5.

In response to the retransmit instruction message, a direct memory access (DMA) is requested by the offload engine. See operation 406. Such DMA is requested to retrieve the data to be retransmitted that is stored in the system memory. It should be noted that, in the context of the present description, DMA is a capability that allows data to be sent directly from memory, such that the processor is freed from involvement with the particular transfer of data, thus speeding up overall operation.

Once the DMA is successfully completed and the data is received, it is then determined whether an ACK was received regarding the instant data, while the various foregoing operations were being carried out. See decision 408. While this may be accomplished in any desired manner, this may optionally be accomplished by initiating a comparison involving the aforementioned sequence number. Specifically, if an ACK bears a sequence number that is greater than the previously collected sequence number, it can be assumed that some or all of the data was successfully received by the remote host.

Thus, based on the foregoing comparison in decision 408, the data is retransmitted over a network, utilizing the offload engine. See operation 410. In particular, if the data was not confirmed to be successfully received, the data can be retransmitted.

FIG. 5 illustrates an exemplary method 500 for generating a retransmit instruction message, in accordance with one embodiment. As an option, the method 500 may be carried out in the context of operation 404 of FIG. 4. Of course, however, it should be noted that the method 500 may be implemented in any desired context. Moreover, while various functions may be attributed to exemplary components (i.e. like those set forth hereinabove), it is important to understand that the various functionality may be carried out by any desired entity.

As shown, in operation 502, a buffer is identified by a processor (see for example, processor 304 of FIG. 3). The buffer may be identified via the CB handle as shown in the example status message in Table 1. The buffer to be retransmitted is normally the oldest unacknowledged buffer associated with the aforementioned CB handle.

It is then determined in decision 504 whether the buffer has been partially received by the remote host. In other words, it is determined by the processor whether the data in the identified buffer that is to be retransmitted has been partially received in a successful manner. If the data buffer has been at least partially acknowledged, an offset is identified for offsetting a starting address associated with the aforementioned DMA (note operation 406 of FIG. 4). See operation 506. If no offset is required, operation 506 is skipped. Alternatively, the starting address associated with the aforementioned DMA may be modified by the amount of the offset, thereby eliminating the need to transmit a separate offset indicator.

Next, it is determined whether the data is less than the retransmit data size indicated by the aforementioned status message. If this is the case, additional buffers may be included. See operation 510. If not, however, operation 510 is skipped.

Thus, similar to the status message of Table 1, the retransmit instruction message may include various information. For example, a starting address for the DMA operation may be an offset into a scatter-gather list (SGL) associated with the socket. Still further included may be the aforementioned sequence number. Still yet, the retransmit instruction message may include a CB handle for a socket, or any other desired information.

Table 2 illustrates an exemplary retransmit instruction message format. Such format is set forth for illustrative purposes only, and should not be considered as limiting in any manner. TABLE 2 Ver IB Length IB Code CB Handle [15:0] — SGL Offset [15:0] Sequence Number [31:0]

The retransmit instruction message may therefore be used in operations subsequent to operation 404 of FIG. 4 (see, for example, operations 406-410 of FIG. 4).

FIG. 6 illustrates an exemplary design and operation 600 for handling retransmission requests, in accordance with an exemplary embodiment. As an option, the design and operation 600 may be carried out in the context of the disclosure of the previous figures. Of course, however, it should be noted that the design and operation 600 may be implemented in any desired context. Most importantly, the exemplary design and operation 600 is set forth for illustrative purposes only, and should not be considered as limiting in any manner.

As shown, the exemplary design and operation 600 includes a host driver 618 associated with a processor which, in turn communicates with an offload engine 601 which comprising a plurality of exemplary components. For example, the offload engine 601 is shown to include a receiver 604, a CB poller 602, a status message generator 606, an instruction block (IB) queue 620, an IB parser 608, a transmission requestor 610, a DMA queue 612, CB memory 614, and a data packet generator 616, which are coupled as shown. The functionality of the various components will be set forth in greater detail hereinafter during a discussion of the use of the exemplary design and operation 600.

As shown, the CB poller 602 detects whether a socket needs retransmitting by examining a retransmit timestamp in the CB memory 614. A retransmit status message is then generated by the status message generator 606, and sent to the local host via the host driver 618. As previously mentioned, the status message may include the sequence number associated with the retransmit request, and is obtained from the last unacknowledged sequence number field from the CB memory 614. The status message may also include the retransmit data size associated with the retransmit request.

The local host (or the offload engine 601, for that matter) may maintain an SGL for the socket. When the local host receives the status message, the driver 618 may take the oldest buffer from the list and use that in the retransmit instruction message. As indicated earlier, if the amount of data in the oldest buffer is less than the retransmit data size requested by the remote host, the local host may include as many buffers in the retransmit instruction message as needed.

Since the local host is informed of all ACK advance events for the socket via status messages, it may also know if the remote host has partially ACK'ed data in the buffer. In this case, as explained previously, the local host may offset the starting address in the buffer by the appropriate amount. Table 3 illustrates an exemplary ACK status message format. Such format is set forth for illustrative purposes only, and should not be considered as limiting in any manner. TABLE 3 Ver SB Length SB Code CB Handle [15:0] ACK Number [31:0]

After the local host receives the status message, the local host generates a retransmit instruction message, which is sent to the offload engine 601 and queued locally in a buffer. See IB queue 620.

When the IB parser 608 receives the retransmit instruction message, it parses the instruction message and if it determines the type to be a retransmit instruction, it forwards the request to the transmission requestor 610. The transmission requestor 610 then retrieves the necessary parameters from the CB memory 614 and requests a DMA operation to retrieve the retransmit data from host memory. The DMA request may then be queued in a FIFO in the DMA queue 612. The DMA operation may be similar to a normal data transmit request. The sequence number from the retransmit instruction message, along with an additional bit may be sent along with the DMA request to indicate that the data request is for a retransmission.

When the DMA is complete, the data packet generator 616 is able to identify that the request is a retransmission request, because the retransmit bit is asserted along with a DMA data available indicator. When the data packet generator 616 encounters this, the data packet generator 616 may compare the sequence number for the retransmitted packet with the oldest unACK'ed sequence number in the CB memory 614. If there is a match, the retransmission is still valid and the packet is retransmitted. If the version of the sequence number in the CB memory 614 is greater than the sequence number for the retransmitted data, the remote host has ACK'ed all or part of the data in the time between when the retransmission request was made and when the DMA was completed. In this case, the data retransmission request may be aborted or continued depending on the amount of data acknowledged.

During use, retransmissions that are triggered by the reception of duplicate ACKs or a selective acknowledgement (SACK) option may also be instigated with a status message to the local host. From the local host viewpoint, it does not necessarily observe the difference between the different retransmission types. The receiver 604 may be equipped to request status messages for these cases. When the number of duplicate ACKs received threshold is reached, the receiver 604 may request a retransmit status message and set a duplicate ACK state bit in the socket CB memory 614. If it receives further duplicate ACKs and observes that this bit is still set, no further retransmissions are requested. When the data packet generator 616 sends the retransmitted packet, it may clear the foregoing bit.

When the receiver 604 receives packets from the remote host that contain the SACK option, it may also request a retransmit status message. Unlike the duplicate ACK case, a retransmit status message may be requested for every SACK option received. The retransmit data size is also known from the parameters received in the SACK options.

FIG. 7 illustrates an exemplary design of an SGL list that is maintained for each socket. The SGL 700 contains a list of entries that specify the data that is transmitted on a socket.

Each SGL entry contains a pointer to a location in host memory where transmitted data is stored, along with the amount of data to be transmitted. Table 4 illustrates an exemplary SGL entry format. Such format is set forth for illustrative purposes only, and should not be considered as limiting in any manner. TABLE 4 Host Address where data is stored Amount of Data in SGL Entry to be transmitted

Two pointers are maintained for each SGL. The first pointer indicates the location within the SGL where the next entry will be written. See 701. When more data is to be transmitted on the socket, the SGL location indicated by this pointer will be written with an SGL entry containing the host address where the data is located and how much data is to be transmitted.

The second pointer maintained for the SGL is a pointer to the oldest unacknowledged data buffer. See 702. This pointer is used to keep track of which data should be retransmitted when a retransmit status message is received. As the local host receives ACK status messages indicating how much data the remote host has successfully received, this pointer is incremented. When all the data in the oldest SGL entry has been acknowledged by the peer, the buffer indicated by the aforementioned entry may be freed and reused by the local host. In this manner, the local host can quickly locate the data to be retransmitted when it receives retransmit status messages.

While various embodiments have been described above, it should be understood that they have been presented by way of example only, and not limitation. Thus, the breadth and scope of a preferred embodiment should not be limited by any of the above-described exemplary embodiments, but should be defined only in accordance with the following claims and their equivalents. 

1. An offload engine system for performing the retransmission of data in a network, comprising: an offload engine in communication with system memory and a network, wherein the offload engine manages the retransmission of data transmitted in the network.
 2. The system as recited in claim 1, wherein the offload engine is in communication with a processor and manages the retransmission of the data, by: identifying the data to be retransmitted, retrieving the data to be retransmitted that is stored in the system memory, and retransmitting the retrieved data.
 3. The system as recited in claim 2, wherein the offload engine transmits a status message to the processor to initiate the retrieval of the data to be retransmitted, and the status message is transmitted based on the receipt of at least one acknowledgement or lack thereof.
 4. The system as recited in claim 2, wherein the offload engine transmits a status message to the processor to initiate the retrieval of the data to be retransmitted, and the status message is transmitted based on a timeout.
 5. The system as recited in claim 2, wherein the offload engine transmits a status message to the processor to initiate the retrieval of the data to be retransmitted, and the status message includes a handle for a control block for a socket.
 6. The system as recited in claim 2, wherein the offload engine transmits a status message to the processor to initiate the retrieval of the data to be retransmitted, and the status message includes a sequence number.
 7. The system as recited in claim 2, wherein the offload engine transmits a status message to the processor to initiate the retrieval of the data to be retransmitted, and the status message includes a retransmit data size.
 8. The system as recited in claim 2, wherein the offload engine transmits a status message to the processor to initiate the retrieval of the data to be retransmitted, and the processor transmits a retransmit instruction message to the offload engine, in response to the status message.
 9. The system as recited in claim 8, wherein the retransmit instruction message includes a sequence number.
 10. The system as recited in claim 8, wherein the retransmit instruction message includes at least one pointer to at least one host buffer.
 11. The system as recited in claim 10, wherein the pointer is maintained by the offload engine.
 12. The system as recited in claim 10, wherein the pointer is maintained by the processor.
 13. The system as recited in claim 10, wherein the retransmit instruction message includes an offset for use with the pointer to identify the data to be retransmitted.
 14. The system as recited in claim 13, wherein the offset is included to specify a starting location in a buffer list for the data to be retransmitted.
 15. The system as recited in claim 8, wherein the retransmit instruction message includes a handle for a control block for a socket.
 16. The system as recited in claim 15, wherein the control block includes information associated with the data that is recently acknowledged.
 17. The system as recited in claim 8, wherein the offload engine requests a direct memory access to retrieve the data to be retransmitted, in response to the retransmit instruction message.
 18. The system as recited in claim 17, wherein the offload engine initiates a comparison involving a sequence number, in response to receipt of the data to be retransmitted.
 19. The system as recited in claim 18, wherein the offload engine retransmits the data based on the comparison.
 20. The system as recited in claim 1, wherein the offload engine transmits a status message to a processor to indicate that an acknowledgement for transmitted data has been received from a remote host.
 21. The system as recited in claim 20, wherein the status message includes a handle for a control block for a socket.
 22. The system as recited in claim 20, wherein the status message includes an acknowledgement number.
 23. The system as recited in claim 1, wherein the system memory includes processor system memory coupled to a processor via a bus.
 24. The system as recited in claim 1, wherein the system memory includes processor system memory that resides on a processor.
 25. The system as recited in claim 1, wherein the offload engine includes a receiver, a poller, memory, a status message generator, an instruction block queue, an instruction block parser, a transmission requestor, a direct memory access queue, and a data packet generator.
 26. An offload engine sub-system for performing the retransmission of data in a network, comprising: an offload engine in communication with a processor and a network, wherein the offload engine manages data transmitted in the network, by: identifying data to be retransmitted, retrieving the data to be retransmitted that is stored in processor system memory, and retransmitting the retrieved data.
 27. A method for performing the retransmission of data in a network, utilizing an offload engine, comprising: identifying data to be retransmitted; retrieving the data to be retransmitted that is stored in system memory, and retransmitting the retrieved data.
 28. A method for performing the retransmission of data in a network, comprising: generating and transmitting a status message to a processor for requesting the retransmission of data stored in processor system memory, utilizing an offload engine, the status message including a sequence number, a handle for a control block for a socket, and a retransmit data size, wherein the control block includes information associated with the data that is recently acknowledged; in response to the status message, generating and transmitting a retransmit instruction message to the offload engine, utilizing the processor, by: identifying a buffer, if the buffer has been partially acknowledged, identifying an offset into the buffer, and if the buffer is less than the retransmit data size, including additional buffers, wherein the retransmit instruction message includes the sequence number, a pointer, and the handle for the control block for a socket; in response to the retransmit instruction message, requesting a direct memory access to retrieve the data to be retransmitted that is stored in the processor system memory, utilizing the offload engine; upon receiving the data to be retransmitted, initiating a comparison involving the sequence number, utilizing the offload engine; and based on the comparison, retransmitting the data over a network, utilizing the offload engine. 